package com.conferenceroom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.conferenceroom.dto.RoomSelect;
import com.conferenceroom.entity.Room;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface RoomMapper extends BaseMapper<Room> {
    List<Room> findAvailableRooms(RoomSelect roomSelect);

    @Select("SELECT room_id, roomname FROM meeting_room WHERE roomname LIKE CONCAT('%', #{roomname}, '%')")
    List<Map<String, Object>> selectRoomIdsByRoomName(String roomname);


}
